import { Controller, Get, Param } from "@nestjs/common";
import { StudentsService } from "src/core/service/students.serivice";

@Controller()
export class StudentsController {
    //通过构造函数注入StudentsService
    constructor(private readonly studentsService: StudentsService) { }
    @Get()
    findAll() {
        return this.studentsService.findAll();
    }
    @Get(':id')
    findOne(@Param('id') id: string) {
        return this.studentsService.findOne(+id);

    }
}